<?php
require "../icommon.php";

require_once "tools/tree/sort.class.php";
$tree = new SortClass($iDB,'`t_reported_sys`');

$op=$_REQUEST['op'];
$cname=$_REQUEST['cname'];
$key=$_REQUEST['key'];
$remark=$_REQUEST['remark'];
$pid=$_REQUEST['pid'];
$cid=$_REQUEST['cid'];
$who=$_REQUEST['who'];
$to=$_REQUEST['to'];
$flag=true;
#if(!FunctionUtils::deny()){die(@FunctionUtils::emptyJSON("IP受限"));}
if($flag){
	switch($op){
		case "add":
			$tree->addNode($cname,$remark,$pid);
			break;
		case "mod":
			$tree->modNode($cid,$cname,$key,$remark,$pid);
			break;
		case "del":	
			$tree->delNode($cid,$key);
			break;
		case "move":	
			$tree->moveNode($who,$to);
			break;
		default:
	}
}

	